package main;

import java.io.IOException;
import java.util.Random;

import javax.microedition.lcdui.Image;

public class Res {
	private static Res intance;
	public Image imgBackground;
	public Image imgWall;
	public Image imgTank;
	public Image imgTankGun;
	protected static Random random;
	private Res(){
		try {
			imgBackground = Image.createImage("/background.png");
			imgWall = Image.createImage("/wall.png");
			imgTank = Image.createImage("/tank.png");
			imgTankGun = Image.createImage("/tank_gun.png");
			
			random = new Random(System.currentTimeMillis());
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	public static int random(int n){
		return random.nextInt(n);
	}
	public static Res get(){
		if(intance == null){
			intance = new Res();
		}
		return intance;
	}
}
